[java] run 2 threads simultaneously
Posted
by lamsaitat
on Stack Overflow
See other posts from Stack Overflow
or by lamsaitat
Published on 2009-04-20T16:13:40Z
Indexed on
2010/05/02
6:17 UTC
Read the original article
Hit count: 160
hi all,
in the case of an IM client. i have made 2 separate threads to handle sending packets (by std io) and receiving packets. the question is how to make these 2 threads run simultaneously so that i can keep prompting for input while at the same time be ready to receive packets at any time?
i have already tried setting a timer but the data is always lost receiving.
© Stack Overflow or respective owner